# 回文数：12321,123321
# 回文数并且是某个数的平方

# 判断回文数


def palindromes(num):
    temp = str(num)
    temp2 = temp[::-1]
    if temp == temp2:
        return True


# 判断平方


def squ_pal(num):
    if (num**0.5) % 1 == 0.0:
        return True


n = 100
while n < 100000:

    if palindromes(n) and squ_pal(n):
        print(n)
        n += 1
    else:
        n += 1
else:
    print("over")
